<!DOCTYPE html>
<html lang="en">
<head>
    <title>投票结果</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <!--<link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">-->
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <!--<link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">-->
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <!--<script src="https://file.ggxqce.com/web/vue.min.js"></script>-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <link href="votePublic.css" rel="stylesheet"/>
    <style>
        [v-cloak] {
            display: none;
        }
        input:focus {
            　　font-size: 16px !important;
        }
        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            outline: none;
        }

        body {
            background: #fff;
        }

        .btn-blue {
            border: none;
            background: #2a8ced;
            color: #fff;
            height: 30px;
            width: 14%;
            border-radius: 3px;
        }

        .visitingBox {
            background: #fff;
            padding-bottom: 50px;
        }

        .item {
            height: 55px;
            line-height: 45px;
            padding: 0 5px;
            font-size: 14px;
            position: relative;
            border-bottom: 1px solid rgb(238,238,238);
            display: table;
            width: 100%;
            padding-left: 60px;
        }
        .item .center {
            float: none;
            margin-right: 60px;
            display: table-cell;
            vertical-align: middle;
        }
        .item .center span {
            vertical-align: middle;
            display: table-cell;
            float: none;
            max-height: 45px;
            line-height: 18px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            visibility: inherit;
            margin-top: 2px;

        }
        .item .name {
            position: absolute;
            left: 0;
            top: 11px;
            line-height: 22px;
            text-align: left;
            padding-left: 5px;
            text-align: justify;
            width: 41px;
        }
        .item .maoHao{
            position: absolute;
            left: 45px;
            top: 11px;
            line-height: 22px;
            text-align: left;
        }
        .item .name:after { content: " "; display: inline-block; width: 100%;}

        .item .time {
            /* float: right; */
            color: #aaa;
            /* line-height: 22px; */
            position: absolute;
            width: 60px;
            right: 10px;
            top: 20px;
            line-height: 22px;
            text-align: right;
        }
        .btn-blue.focus, .btn-blue:focus, .btn-blue:hover {
            color: #fff;
            text-decoration: none;
        }

        .lineTwo span {
            max-height: 55px;
            line-height: 16px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            text-align: left;
            padding: 5px;

        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .imgBox {
            margin-left: 20px;
        }

        .imgBox .title {
            padding-left: 5px;
            height: 45px;
            line-height: 45px;
            position: relative;
            font-size: 14px;
        }

        .imgBox .title i {
            position: absolute;
            left: -10px;
            top: 2px;
            color: red;
            font-size: 16px;
        }

        .imgBox img {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
        }

        .imgBox .desc {
            color: #aaa;
        }


        .btn {
            display: inline-block;
            padding: 6px 12px;
            margin-bottom: 0;
            font-size: 14px;
            font-weight: 400;
            line-height: 1.42857143;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            -ms-touch-action: manipulation;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-image: none;
            border: 1px solid transparent;
            border-radius: 4px;
        }
        .oaBtn, .btn-primary {
            background: #2a8cec !important;
            background-size: 100% 100% !important;
            color: #fff !important;
            min-width: 80px;
            text-align: center !important;
            border: 1px solid transparent;
            border-radius: 0px !important;
        }
        .userBtnBox {
            margin: 0 auto;
            position: relative;
        }
        .cancelBtn {
            background: #FFF !important;
            background-size: 100% 100% !important;
            color: #333 !important;
            min-width: 80px;
            text-align: center !important;
            border: 1px solid #DDD;
            border-radius: 0px !important;
        }
        .tijiaoBtn {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            line-height: 50px;
            background: #2a8cec;
            color: #fff;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
        }

        .noData {
            padding-top: 60px;
            font-size: 16px;
            color: #ddd;
            text-align: center;
        }

        .item .center{
            margin-right: 70px;
            display: table-cell;
            vertical-align: middle;
            padding: 0 5px;
            padding-left: 55px;
            padding-right: 100px;
            text-align: left;
        }
        .item .time {
            /* float: right; */
            color: #aaa;
            /* line-height: 22px; */
            position: absolute;
            width: 90px;
            right: 5px;
            top: 10px;
            line-height: 22px;
            text-align: right;
        }
        .titleBox{
            height: 45px;
            width: 100%;
        }
        .titleBox .left{
            float:left;
        }

        body, html {
            width: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }

        #allmap, #allmap2 {
            /*width: 100%;*/
            height: 300px;
            overflow: hidden;
            margin: 0;
            font-family: "微软雅黑";
        }

        [v-cloak] {
            display: none;
        }

        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            font-size: 12px;
        }

        body {
            margin: 1px;
            background: #ffffff;
        }

        .boxBoy {
            background: #fff;
        }

        table {
            border-spacing: 0;
            border-collapse: collapse;
            display: table;
        }

        .weather {
            text-align: center;
            font-size: 16px;
            /*position: absolute;*/
            top: 5px;
            line-height: 30px;
            float: left;
        }

        th {
            font-weight: normal;
        }
        table.text-center th {
            text-align: center;
            font-size: 12px;
            margin-top: -1px;
            height: 30px;

        }
        table.text-center, table.text-center td{
            text-align: center;
            font-size: 12px;
            height: 44px;

        }
        .shTable td{
            line-height: 45px !important;
            height: 45px !important;
        }

        .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
            border: 1px solid #cbcbcd;
            height: 28px;
            position: relative;
            color: #333;
            padding: 0 4px;
        }

        table th {
            background: #f8f8f8;
        }

        .table-bordered {
            border: 1px solid #cbcbcd;
        }

        .table {
            width: 100%;
            max-width: 100%;
        }
        .fixHeader{
            top:0;
            left:0;
            width: 100%;
            position: fixed;
            z-index: 99999;
        }
        .tjResult{
            color: #2a8cec;
            position: absolute;
            width: 100px;
            right: 0px;
            top: 0px;
            height: 45px;
            line-height: 45px;
            text-align: center;
            font-size: 12px;
        }

        table th {
            background-color: #f5f5f5;
            background: #d3e8fd;
            color: black ;
            font-size: 12px ;
        }
        .icon-zhankai, .icon-shouqi {
            cursor: pointer;
            border-radius: 5px;
            float: right;
            font-weight: bold;
            position: absolute;
            right: 10px;
        }
        @font-face {font-family: "iconfont";
            src: url('//at.alicdn.com/t/font_855021_i2jfy4r0uq.eot?t=1538037545426'); /* IE9*/
            src: url('//at.alicdn.com/t/font_855021_i2jfy4r0uq.eot?t=1538037545426#iefix') format('embedded-opentype'), /* IE6-IE8 */
            url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAAB5QAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ikh2Y21hcAAAAYAAAABfAAABnLQCHG9nbHlmAAAB4AAAAJ8AAAFUVBJZhmhlYWQAAAKAAAAALQAAADYSw7OzaGhlYQAAArAAAAAcAAAAJAfeA4VobXR4AAACzAAAAA4AAAAQEAAAAGxvY2EAAALcAAAACgAAAAoA4gBybWF4cAAAAugAAAAeAAAAIAEQACtuYW1lAAADCAAAAUUAAAJtPlT+fXBvc3QAAARQAAAAMgAAAENVnNMueJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeiTxrYW7438AQw9zA0AAUZgTJAQDolQx7eJztkLENgDAMBM9JQBGiZIqIEjEQFYNk1qwRHJuCIXjrLPtluXhgAqKyKwnkRhi61BXzI4v5iVP3rBWgba202vt3MoldZJ2Cf5CZX6v1493iSM2xLItjfnWQB1W2FDIAeJxjYGIAAmZlJjcGPgYZBgZGMzE2dlY2dVU9RjtGeUZhBNdMnpHpk4Ais9B/Bj6+/wzc7DxiPJ+QBISYFQU+McpwiahxNLCzN7BJiHOwVjDOgPE51ES4KoBWQexTZEoB2icHtI9Nzcxc1UycVY6Rj1GfkZkNaBESn5EPZAEj0AJGmI1Agp0bWYRxCaqd/zJYOcQl2BACDHT2IwAScDAkAHicY2BkYGAA4o//DFzj+W2+MnCzMIDA9Us7NJFpFgamFCDFwcAE4gEAMrkJnQAAAHicY2BkYGBu+N/AEMPCAAJAkpEBFbAAAEcKAm14nGNhYGBgQcIAALAAEQAAAAAAAAA4AHIAqgAAeJxjYGRgYGBhkGdgYgABEMkFhAwM/8F8BgAL6wE8AAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxjYGKAAC4G7ICFkYmRmZGFkZWBzb0ov7RAl604I7+0MJO9KiMxLzsxk4EBAGluB+8AAA==') format('woff'),
            url('//at.alicdn.com/t/font_855021_i2jfy4r0uq.ttf?t=1538037545426') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
            url('//at.alicdn.com/t/font_855021_i2jfy4r0uq.svg?t=1538037545426#iconfont') format('svg'); /* iOS 4.1- */
        }

        .iconfont {
            font-family:"iconfont" !important;
            font-size:16px;
            font-style:normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            margin-top: 2px;
        }

        .icon-Group-:before { content: "\e684"; }

        .icon-shouqi:before { content: "\e614"; }

        .icon-zhankai:before { content: "\e62a"; }


        .touBtn {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            line-height: 50px;
            background: #2a8cec;
            color: #fff;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
            margin: 0 auto;
            z-index: 11111;
        }
        .touBtn div{
            float:left;
            width: 50%;
            box-sizing: border-box;
            font-size: 16px;
        }
        .touBtn .line{
            height: 24px;
            width: 1px;
            background: #fff;
            position: absolute;
            left: 50%;
            top: 13px;
        }
        textarea::-webkit-input-placeholder {
            color: #aaa;
        }
        .inputBoxBj{
            background:rgba(0,0,0,0.5);
            width: 100vw;
            height: 100vh;
            position: fixed;
            left:0;
            top:0;
            z-index: 111111111;
        }
        .inputBox{
            position: absolute;
            width: 80%;
            height: 288px;
            background: #fff;
            left: 50%;
            top: 50%;
            margin-left: -40%;
            margin-top: -150px;

        }
        .inputBox .desc{
            margin: 0 5px;
        }
        .inputBox .title{
            border-bottom:none;
            font-weight: bold;
            margin: 0;
            text-align: center;
            padding-left: 0;
        }
        .infoBox .title{
            font-size: 22px;
            font-weight: bold;
            margin-bottom: 5px;
        }
        .infoBox .desc{
            font-size: 16px;
        }
        .okBtn{
            width: 100%;
            height: 50px;
            line-height: 50px;
            background: #2a8cec;
            color: #fff;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
            position: absolute;
            bottom:0;
            left:0;
            cursor: pointer;
        }

        .gbBtn{
            position: absolute;
            top: 14px;
            right: 12px;
            cursor: pointer;
            height: 17px;
            width: 17px;
            z-index: 9999;
        }
        textarea{
            width: 100%;
            font-size: 16px;
            line-height: 24px;
            padding: 5px 10px;
            height: 180px;
            border: 2px solid rgb(238,238,238);
            resize:none
        }
        .tbTitle{
            float: left;
            border-right: 1px solid #ddd;
            height: 100%;
            line-height: 45px;
            border-bottom: 1px solid rgb(238,238,238);
        }
        .tbValue{
            line-height: 45px;
            border-bottom: 1px solid rgb(238,238,238);
            text-align: center;
            /* padding-left: 10px; */
            color: #2a8cec;
            background: #fff;
            float: left;
        }

        .table-detail {
            width: 100%;
            border-left: 1px solid #e8e8e9;
            border-top: 1px solid #e8e8e9;
            border-spacing: 0;
            /*table-layout: fixed;*/
            /*background-color: #f5f5f5;*/
            /*background: #d3e8fd !important;*/
            color: black !important;
        }
        .table-detail .td-title {
            background-color: #f5f5f5;
            height: 30px;
        }





        .table-detail td {
            border-right: 1px solid #e8e8e9;
            border-bottom: 1px solid #e8e8e9;
            padding-left: 0px !important;
            padding-right: 0px !important;
            padding-top: 0px !important;
            padding-bottom: 0px !important;
            height: 45px;
            /*line-height: 29px;*/
            text-align: center;
            position: relative;
            overflow: hidden;
            word-wrap: break-word;
        }
        .moreSpan {
            overflow: hidden;
            text-overflow:ellipsis;
            white-space: nowrap;
            line-height: 45px;
            display: block;

        }
        .ldName{
            text-align: justify;
            width: 36px;
            display: inline-block;
            line-height: 0px;
        }
        .ldName:after {
            content: " ";
            display: inline-block;
            width: 100%;
        }
        .oaColor{
            color:#2a8cec;
        }
    </style>
</head>
<body>
<section class="content" id="app" style="padding: 0px;padding-bottom: 45px;" v-cloak>
    <div class="div-td-content-more"><i></i></div>
    <div class="treeBox" v-show="userModel">
        <div class="tabContent">
            <div class="tabContentLeft"></div>
            <div class="tabContentMiddle">
             <span :class="selectTree==0? 'tabActive':'tabNo'" @click="selectTree=0;changeTree()">
                    按组织结构选择
                </span>
                <span id="cusBtn" :class="selectTree==1? 'tabActive':'tabNo'" @click="selectTree=1;">
                    按部门岗位选择
                </span>
            </div>
            <div class="tabContentRight"></div>
        </div>
        <div style="overflow: auto;background: #f7f8fa;margin: 15px 20px;margin-top: 60px;border: 1px solid #ddd;">
            <div class="selectBox" v-show="selectTree==1">
                <div class="typeTitle">请选择公司：</div>
                <div class="companyLIst listBox">
                    <div :class="item.select?'item active':'item'" v-for="(item,i) in selectBox.companyList" @click="selectItem(item,'1')">{{item.name}}</div>
                </div>
                <div class="typeTitle">请选择部门：</div>

                <div class="companyLIst listBox">
                    <div :class="item.select?'item active':'item'" v-for="(item,i) in selectBox.departList"  @click="selectItem(item,'2')">{{item.departName}}</div>
                    <div class="noData" v-if="selectBox.departList.length==0">请先选择公司</div>
                </div>
                <div class="typeTitle">请选择职位：</div>
                <div class="companyLIst listBox">
                    <div :class="item.select?'item active':'item'" v-for="(item,i) in selectBox.roleList"  @click="selectItem(item,'3')">{{item.roleName}}</div>
                    <div class="noData" v-if="selectBox.roleList.length==0">请先选择部门</div>
                </div>
            </div>
            <div v-show="selectTree==0">
                <div class="inputTreeBox">
                    <input type="text" class="selecetInput" placeholder="输入姓名" id="autoUser" v-on:input="get_search()">
                    <input type="button" class="search-button">
                </div>
                <ul class="ztree" id="ulRegion" style="height: 75vh;overflow-y: auto;" ></ul>
            </div>
        </div>
        <div class="touBtn">
            <div class="touTa"  @click="saveUser" >确认</div>
            <div class="noTouTa"  @click="cancel" >取消</div>
            <i class="line"></i>
        </div>

    </div>

    <table class="table table-hover text-center " v-if="mainInfo.assigner&&mainInfo.assigner.length>0" v-for="(item,i) in mainInfo.assigner">
        <thead>
        <tr>
            <th style="background: red;color:#fff;" >重新指定第一名：{{item.name}}</th>
        </tr>
        <tbody>
        <tr>
            <td style="padding: 0;height: 30px;">
                <table class="table-detail">
                    <tr>
                        <td class="td-title" style="width: 50px;text-align: center;">指定人</td><td class="td-title" style="text-align: center;">指定原因</td><td class="td-title" style="width: 80px;text-align: center;">指定时间</td>
                    </tr>
                </table>
            </td>

        </tr>
        <tr v-for="(item2,i2) in item.list" >
            <td class="item" >
                <div class="center"><span>{{item2.advice}}</span></div>
                <div class="name">{{item2.createUserName}}</div>
                <div class="maoHao">：</div>
                <div class="time">{{formatDate(item2.createTime)}}</div>
            </td>
        </tr>
        </tbody>
    </table>

    <table class="table table-hover text-center " v-for="(item,i) in list">
        <thead>
        <tr>
            <th>第{{number2big(item.rownum)}}名：{{item.name}}（{{item.num?item.num:'0'}}）
                <template v-if="item.list&&item.list.length>3">
                     <span class="iconfont icon-shouqi" v-if="item.more"
                           @click="item.more=false"></span>
                    <span class="iconfont icon-zhankai"  v-else
                          @click="item.more=true"></span>
                </template>

            </th>
        </tr>
        </thead>
        <tbody>

        <tr v-for="(item2,i2) in item.list" v-if="item.more?item.list.length:i2<3">
            <td class="item">
                <div class="center"><span>{{item2.reason}}</span></div>
                <div class="name">{{item2.createUserName}}</div>
                <div class="maoHao">：</div>
                <div class="time">{{formatDate(item2.createTime)}}</div>
            </td>

        </tr>
        <tr v-if="!item.list||item.list.length==0"><td style="color:#ddd;">无投票信息</td></tr>

        </tbody>
    </table>

    <table class="table table-hover text-center ">
        <thead>
        <tr>
            <th>未投票人员（{{resultInfo.result1.num?resultInfo.result1.num:'0'}}）
            </th>
        </tr>
        </thead>
        <tbody>

        <tr>

            <td v-if="!resultInfo.result1.list" style="color: rgb(221, 221, 221);">
                正在加载...
            </td>
            <td v-else>
                <div class="name" style="width: 25%;line-height: 45px;text-align: center;color:red;float:left;" v-for="(item,i2) in resultInfo.result1.list"><span class="ldName">{{item.name}}</span></div>
            </td>
        </tr>

        </tbody>
    </table>

    <table class="table table-hover text-center ">
        <thead>
        <tr>
            <th>未填写不投票理由人员（{{resultInfo.result2.num2?resultInfo.result2.num2:0}}）
            </th>
        </tr>
        </thead>
        <tbody>

        <tr >
            <td v-if="!resultInfo.result2.list2" style="color: rgb(221, 221, 221);">
                正在加载...
            </td>
            <td v-else>
                <div class="name" style="width: 25%;line-height: 45px;text-align: center;color:red;float:left;" v-for="(item,i2) in resultInfo.result2.list2"><span class="ldName">{{item.name}}</span></div>
            </td>
        </tr>
        </tbody>
    </table>
    <table class="table table-hover text-center  shTable" v-if="(mainInfo.audit&&mainInfo.audit.length>0)||mainInfo.auditInfo">
        <thead>
        <tr>
            <th colspan="4">审批进度</th>
        </tr>
        </thead>
    </table>
    <table v-if="mainInfo.auditInfo"  class="table-detail" style="width: 100%;table-layout: fixed;">
        <tr>
            <td class="td-title" style="width: 18%">驳回原因</td>
            <td  style="padding-left: 10px !important;text-align: left;">{{mainInfo.auditInfo}}</td>
        </tr>
    </table>
    <table class="table-detail" style="width: 100%;table-layout: fixed;" v-if="mainInfo.audit&&mainInfo.audit.length>0">
        <tbody >
        <tr>
            <td class="td-title" style="width: 50px;text-align: center;">审核人</td><td class="td-title" style="width: 70px;text-align: center;">审核状态</td><td class="td-title" style="width: 100px;text-align: center;">审核时间</td><td class="td-title">审核意见</td>
        </tr>
        <tr v-for="(item,i) in mainInfo.audit">
            <td>
                <span class="ldName oaColor" >{{item.auditorName}}</span>
            </td>
            <td style="text-align: center;">
                <span v-if="item.auditFlag===0" style="color:red;">待审核</span>
                <span v-else-if="item.auditFlag===1" class="oaColor">已通过</span>
                <span v-else-if="item.auditFlag===2"  class="oaColor">已驳回</span>
                <span v-else-if="item.auditFlag===-1" class="oaColor">未提交</span>
                <span v-else-if="item.auditFlag===3" class="oaColor">已重新指定</span>
            </td>
            <td style="text-align: center;" class="oaColor">
                {{formatDate(item.auditTime)}}
            </td>
            <td style="text-align: left;">
                <span style="padding-left: 10px;" class="moreSpan oaColor" >{{item.auditAdvise}}</span>
            </td>
        </tr>


        </tbody>
    </table>

    <div class="tijiaoBtn" v-if="mainInfo.auditFlag=='-1'&&mainInfo.createUserId==userInfo.id"  @click="updateUser">修改投票人</div>
    <template v-else-if="!shareApp&&userId">
        <div class="touBtn" v-if="mainInfo.auditFlag=='0'&&mainInfo.currentAuditorId==userInfo.id">
            <div class="touTa"  @click="audit(1)" >通过</div>
            <div class="noTouTa"  @click="goreject" >驳回</div>
            <i class="line"></i>
        </div>
        <div class="tijiaoBtn"  v-else-if="mainInfo.auditFlag=='0'" @click="goBack" >退出</div>
        <div class="tijiaoBtn" @click="share" v-else-if="mainInfo.auditFlag=='1'&&mainInfo.type!=2">分享</div>
        <div class="tijiaoBtn"  v-else-if="mainInfo.auditFlag=='1'&&(mainInfo.auditAllIds.indexOf(userInfo.id)==-1)&&mainInfo.createUserId!=userInfo.id" @click="goBack" >退出</div>
        <div class="tijiaoBtn" @click="goPx" v-else-if="mainInfo.auditFlag=='1'&&mainInfo.type==2">请选择参加全国评比人员</div>
        <div class="tijiaoBtn" @click="goPx()" v-else-if="mainInfo.auditFlag=='3'&&mainInfo.type==2">已选择参加全国评比人员</div>
        <div class="tijiaoBtn" v-else-if="mainInfo.auditFlag=='2'"  style="background: red;color:#fff;">无效结果</div>
    </template>
    <div class="inputBoxBj" v-if="showModel" v-on:click.self="closeModel">
        <div class="inputBox">
            <img src="/dist/img/gb_icon@2x.png"  class="gbBtn" @click="closeModel">
            <div class="title item">请输入驳回原因</div>
            <div class="desc">
                <textarea name="" id="" cols="30" rows="10" placeholder="请输入驳回原因" v-model="auditInfo"></textarea>
            </div>
            <div class="okBtn" @click="audit(2)">确认</div>

        </div>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<script src="/dist/js/oaApp.js"></script>
<!--插件JS-->
<script src="/dist/plugins/scroll/myScroll.js"></script>
<script type="text/javascript" src="/dist/plugins/vue/vue.js"></script>

<!--框架已定义 JS-->
<!--oa自定义  JS-->
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/dist/plugins/ztree/js/jquery.ztree.exhide-3.5.js"></script>
<script>
    $(function () {
        $("body").on("click", ".center,.moreSpan", function (e) {
            if ($(".div-td-content-more").is(":hidden")) {
                var text = $(this).text();
                if (text != "") {
                    text = "<i></i>" + text;
                    $(".div-td-content-more").html(text).css({
                        "width": $(this).outerWidth() + "px",
                        "left": $(this).offset().left,
                        "top": ($(this).offset().top + $(this).outerHeight()) + "px"
                    }).show();
                    e.stopPropagation();
                }
            } else {
                $(".div-td-content-more").hide();
            }
        });
        $("body").on("click", ".div-td-content-more", function (e) {
            e.stopPropagation();
        });
        $("body").on("click", function () {
            $(".div-td-content-more").hide();
        });
    });
</script>
<script>
    $.ajaxSetup({
        global: true,
        type: "POST",
        cache: false,
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        beforeSend: function () {
        },
        complete: function () {

        },
        error: function (e) {
            alert('error' + e.responseText);
        }
    });
    $.extend($.wyui, {
        page: {
            urlParams: null,
            queryParams: {
                requestPage: 1,
                pageSize: 30
            },
            dataUrl: '',
            createQueryParams: function () {
            },
            getByPage: function (type) {
                $.ajax({
                    url: $.wyui.page.dataUrl,
                    data: JSON.stringify($.wyui.page.queryParams),
                    beforeSend: function () {

                    },
                    complete: function () {
                    },
                    success: function (r) {
                        $.wyui.page.queryParams.requestPage++;

                        if (r.data.sendData.pager && r.data.sendData.pager.pageCount == 0) {
                            r.data.sendData.pager.pageCount = 1;
                        }
                        if (type == "scroll") {
                            $.wyui.page.getByPage_scroll_callback(r.data.sendData.records);
                        } else {
                            if ($.wyui.page.getByPage_callback_new) {
                                $.wyui.page.getByPage_callback_new(r.data.sendData.records);
                            }
                        }

                    }
                });
            }
        },
        postMethod: function (url, data, callback, sync, id) {
            if (!id) {
                id = "#app"
            }
            $.ajax({
                url: server.ip + url,
                async: sync ? false : true,
                data: JSON.stringify(data),
                beforeSend: function () {

                },
                complete: function () {
                    setTimeout(function () {
                    }, 1000);

                },
                success: function (r) {
                    if (!r.e.code) {
                        callback(r.data.sendData);
                    } else {
                        alert(r.e.desc);
                    }
                },
                error: function (e) {
                    alert(url + e.responseText);
                }
            });
        },
    });
</script>
<script type="text/javascript">
    $(function () {
        var zTreeRegion_setting = {
            view: {
                showIcon: function (treeId, treeNode) {
                    return treeNode.isParent;
                }
            },
            data: {
                simpleData: {
                    enable: true
                }
            },
            check: {
                chkboxType: { "Y": "ps", "N": "ps" },
                enable: true
            },
            callback: {
                onCheck: zTreeOnCheck,
                beforeClick:zTreeBeforeClick
            }
        };
        $.ajax({
            url: server.ip + "/system/getCDUAll.json",
            data: JSON.stringify({}),
            success: function (r) {
                var nodes=r.data.sendData;
                for (var i = 0; i < nodes.length; i++) {
                    if (nodes[i].name == "收件箱") {
                        nodes[i].name ="组织机构";
                    }
                }
                app.treeObj = $.fn.zTree.init($("#ulRegion"), zTreeRegion_setting, nodes);

            }
        });

        function zTreeBeforeClick(treeId, treeNode, clickFlag) {
            app.treeObj.checkNode(treeNode, '', true);
            return false;
        }
        function zTreeOnCheck(treeId, treeNode) {
            console.log(treeNode);
            var receivers = new Array();
            var Nodes = app.treeObj.getCheckedNodes(true);
            for (var i = 0; i < Nodes.length; i++) {
                if(Nodes[i].type == "user") {
                    receivers.push(Nodes[i].name+"; ");
                }
            }
            console.log(receivers);

            $(".userBox").html(receivers)
        };
    });
</script>
<script type="text/javascript">
    function NewDate(str){
        if(!str){
            return 0;
        }
        arr=str.split(" ");
        d=arr[0].split("-");
        t=arr[1].split(":");
        var date = new Date();
        date.setUTCFullYear(d[0], d[1] - 1, d[2]);
        date.setUTCHours(t[0]-8, t[1], t[2], 0);
        return date;
    }
    var query = null;
    var app = new Vue({
        el: '#app',
        data: {
            selectTree:0,
            selectBox:{
                companyList:[],
                departList:[],
                roleList:[],
                selectCompany:[],
                companyNames: [],
                departNames: [],
                roleNames: [],
                companyIds: [],
                userIds:[]
            },
            userInfo:{},
            resultInfo:{"result1":{},"result2":{}},
            userId: getUrlParamObj().userId,
            mainId:getUrlParamObj().mainId,
            title:getUrlParamObj().title,
            shareApp:getUrlParamObj().shareApp,
            date: "",
            list: [],
            mainInfo:{},
            auditInfo:"",
            isGo:true,
            showModel:false,
            userModel:false,
            treeObj:{}
        },
        methods: {
            goPx:function (type) {
                var _this=this;
                var param = {
                    screenType: '0',        //默认竖屏0, 横屏1
                    title: '选择参加全国拼比人员',         //顶部标题
                    url: '/page/voteApp/selectPx.html?userId='+_this.userId+"&userName="+_this.userInfo.name+"&mainId="+_this.mainId, //路径
                    showTitleBar: false,     //是否显示标题栏
                    enableRefresh: false,   //是否启用下拉刷新
                    backRefresh: true       //是否返回刷新
                }
                JSBridge.call(ROUTER, 'navigateTo', param)
            },
            hideLoading: function () {
                JSBridge.call(UI, 'hideLoading')
            },
            goBack:function () {
                var param = {
                    backRefresh: true,       //是否返回刷新
                }
                JSBridge.call(ROUTER, 'navigateBack', param)
            },
            updateUser:function () {
                var that=this;
//                var param = {
//                    enableNavigateBack: false,
//                }
//                JSBridge.call(UI, 'setEnableNavigateBack', param)
                this.userModel=true;
                if( that.treeObj.getNodesByFilter){
                    JSBridge.call(UI, 'showLoading', {})
                    setTimeout(function () {
                        that.hideLoading()
                    }, 2000)
                    that.treeObj.getNodesByFilter(function (node) {
                        if(that.mainInfo.voteUsers.indexOf(node.id)>-1) {
                            console.log(node.id)
                            that.treeObj.checkNode(node, true, true, false);
                        }else{
                            that.treeObj.checkNode(node, false, false, false);
                        }
                    });
                }else{
                    JSBridge.call(UI, 'showLoading', {})
                    setTimeout(function () {
                        that.hideLoading()
                    }, 4000)
                    console.log("网不好 延迟加载")
                    setTimeout(function () {
                        that.treeObj.getNodesByFilter(function (node) {
                            if(that.mainInfo.voteUsers.indexOf(node.id)>-1) {
                                console.log(node.id)
                                that.treeObj.checkNode(node, true, true, false);
                            }else{
                                that.treeObj.checkNode(node, false, false, false);
                            }
                        });
                    },3000)
                }



            },
            cancel:function (){
                this.userModel=false;
            },
            saveUser:function () {
                var that=this;
                var _this=this;
                JSBridge.call(UI, 'showLoading', {})
                if(this.selectTree=='1'){
                    $.wyui.postMethod('/exam/getUserList.json', {
                        companyIds:that.selectBox.companyIds.join(','),
                        departNames:that.selectBox.departNames.join(','),
                        pageSize: 500,
                        requestPage: 1,
                        roleNames: that.selectBox.roleNames.join(',')

                    }, function (data) {
                        var list=data.records;
                        var userIds=[];
                        if(list.length>0){
                            for(var i=0;i<list.length;i++){
                                userIds.push(list[i].userId)
                            }
                        }
                        that.selectBox.userIds=userIds;
                        if(that.selectBox.userIds.length>0){
                            that.mainInfo.voteUsers=that.selectBox.userIds.join(',')
                        }else{
                            that.mainInfo.voteUsers='';
                        }
                    },true)

                }else{
                    searchTree(true);
                    var receivers = new Array();
                    var Nodes = this.treeObj.getCheckedNodes(true);

                    for (var i = 0; i < Nodes.length; i++) {
                        if(Nodes[i].type == "user") {
                            receivers.push(Nodes[i].id);
                        }
                    }
                    if(receivers.length>0){
                        that.mainInfo.voteUsers=receivers.join(',')
                    }else{
                        that.mainInfo.voteUsers='';
                    }
                }
                //如果是修改
                //修改
                //人员有变化 调用保存
                if(this.isGo) {
                    var data={
                        voteUsers:that.mainInfo.voteUsers,
                        id:_this.mainId,
                        companyIds:that.selectBox.companyIds.join(","),
                        roleNames:that.selectBox.roleNames.join(","),
                        departNames:that.selectBox.departNames.join(",")
                    }
                    this.isGo=false;
                    var param = {
                        title: "加载中...",
                    }
                    $.wyui.postMethod("/vote/saveVote.json",data, function (r) {
                        _this.isGo=true;
                        that.userModel=false;
                        JSBridge.call(UI, 'hideLoading')
                    });
                }else{
                    JSBridge.call(UI, 'hideLoading')
                }

            },
            get_search:function () {
                clearTimeout(query);
                query = setTimeout(function () {
                    searchTree()
                }, 1000);
            },
            getCompanyList:function () {
                var that=this;
                $.wyui.postMethod('/company/getCompanyByUserId.json', {userId: '201711271733404C9DA1461F2421F828'}, function (data) {
                    var isgo=false;
                    for (var i = 0; i < data.length; i++) {
                        if (that.selectBox.companyIds.indexOf(data[i].id) != -1) {
                            isgo=true;
                            data[i].select =true
                        } else {
                            data[i].select = false
                        }
                    }
                    that.selectBox.companyList = data
                    if(isgo){
                        that.selectDepart();

                    }
                })
            },
            changeTree:function () {
                var that=this;
                JSBridge.call(UI, 'showLoading', {})
                setTimeout(function () {
                    that.hideLoading()
                }, 2000)
                if(that.selectBox.userIds.length>0){
                    var userIdsStr=that.selectBox.userIds.join(',')
                    this.treeObj.getNodesByFilter(function (node) {
                        if(userIdsStr.indexOf(node.id)>-1) {
                            console.log(node.id)
                            that.treeObj.checkNode(node, true, true, false);
                        }else{
                            that.treeObj.checkNode(node, false, false, false);
                        }
                    });
                }

            },
            selectDepart: function () {
                var that = this;
                if (that.selectBox.companyIds.length > 0) {
                    var companyIds = that.selectBox.companyIds.join(',');
                    $.wyui.postMethod('/exam/getDepartListByCompanyIds.json', {companyIds: companyIds}, function (data) {
                        var isgo = false;
                        var newList = [];
                        console.log(data)
                        for (var i = 0; i < data.result.length; i++) {
                            if (that.selectBox.departNames.indexOf(data.result[i].departName) != -1) {
                                data.result[i].select = true;
                                newList.push(data.result[i].departName)
                                isgo = true
                            } else {
                                data.result[i].select = false
                            }
                        }
                        that.selectBox.departNames = newList;
                        that.selectBox.departList = data.result

                        if (isgo) {
                            that.selectRoleName();
                        } else {
                            that.selectBox.roleNames = [];
                            for (var i = 0; i < that.selectBox.roleList.length; i++) {
                                that.selectBox.roleList[i].select = false;
                            }
                        }
                    })
                }
            },
            selectRoleName: function () {
                var that = this;
                if(that.selectBox.departNames.length>0) {
                    var companyIds=that.selectBox.companyIds.join(',');
                    var departNames=that.selectBox.departNames.join(',');
                    $.wyui.postMethod('/exam/getRoleNameListByCompanyAndDepart.json', {
                        companyIds: companyIds,
                        departNames: departNames
                    }, function (data) {
                        console.log(data);
                        var newList=[];
                        for (var i = 0; i < data.result.length; i++) {
                            if (that.selectBox.roleNames.indexOf(data.result[i].roleName) != -1) {
                                data.result[i].select = true;
                                newList.push(data.result[i].roleName)
                            } else {
                                data.result[i].select = false
                            }
                        }
                        that.selectBox.roleNames=newList;
                        that.selectBox.roleList = data.result
                    })
                }
            },
            getUserIds:function () {
                var that=this;
                $.wyui.postMethod('/exam/getUserList.json', {
                    companyIds:that.selectBox.companyIds.join(','),
                    departNames:that.selectBox.departNames.join(','),
                    pageSize: 500,
                    requestPage: 1,
                    roleNames: that.selectBox.roleNames.join(',')

                }, function (data) {
                    var list=data.records;
                    var userIds=[];
                    if(list.length>0){
                        for(var i=0;i<list.length;i++){
                            userIds.push(list[i].userId)
                        }
                    }
                    that.selectBox.userIds=userIds;
                    console.log(that.selectBox.userIds);
                })
            },
            selectItem: function (item,type) {
                var check;
                if (type == '1') {
                    check = "companyIds"
                    this.checkedOne(check, item.id);
                } else if (type == '2') {
                    check = "departNames"
                    this.checkedOne(check, item.departName);
                } else {
                    check = "roleNames"
                    this.checkedOne(check, item.roleName);
                }
                if (item.select == true) {
                    item.select = false
                } else {
                    item.select =true
                }
                console.log(item)
            },
            checkedOne: function (checkList, moduleKey) {
                var that=this;
                var idIndex = this.selectBox[checkList].indexOf(moduleKey)
                if (idIndex >= 0) {
                    this.selectBox[checkList].splice(idIndex, 1)
                } else {
                    this.selectBox[checkList].push(moduleKey)
                }
                if(checkList=='companyIds'){
                    if(that.selectBox.companyIds.length==0){
                        that.selectBox.departList=[];
                        that.selectBox.departNames=[];
                        that.selectBox.roleList=[];
                    }
                    that.selectDepart()

                }
                if(checkList=='departNames'){
                    if(that.selectBox.departNames.length==0){
                        that.selectBox.roleList=[];
                        that.selectBox.roleNames=[];
                    }

                    that.selectRoleName()
                }
                if(checkList=='roleNames'){
                    if(that.selectBox.roleNames.length>0) {
                        that.getUserIds();
                    }else{
                        that.selectBox.userIds=[];
                    }
                }

            },




            goreject:function(){
                var _this=this;
                var param = {
                    screenType: '0',        //默认竖屏0, 横屏1
                    title: '驳回',         //顶部标题
                    url: '/page/voteApp/reject.html?userId='+_this.userId+"&userName="+_this.userInfo.name+"&mainId="+_this.mainId, //路径
                    showTitleBar: false,     //是否显示标题栏
                    enableRefresh: false,   //是否启用下拉刷新
                    backRefresh: true       //是否返回刷新
                }
                JSBridge.call(ROUTER, 'navigateTo', param)
            },
            closeModel:function(){
                this.showModel=false;
            },
            audit:function (type) {
                var _this=this;

                var param = {
                    title: "提示",
                    content: "确定要通过吗",
                    cancelText: "取消",
                    confirmText: "确定",
                    showCancel: true,
                    cancelable: false
                }
                _this.dialogResult = "等待选择..."
                JSBridge.call(UI, 'showDialog', param, function (res) {
                    if ('确定' == res.sendData.data) {
                        JSBridge.call(UI, 'showLoading', {})
                        if(_this.isGo) {
                            var data={
                                id:_this.mainId,
                                auditFlag:1,
                                userId:_this.userInfo.id,
                                advise:'同意！'
                            }
                            _this.isGo = false;
                            $.wyui.postMethod("/vote/applyAudit.json", data, function (r) {
                                _this.isGo = true;
                                JSBridge.call(UI, 'hideLoading')
                                if(type=='2'){
                                    JSBridge.call(UI, 'showToast', {title: "驳回成功！"})
                                }else{
                                    JSBridge.call(UI, 'showToast', {title: "审核成功！"})
                                }

                                _this.getMain();
                                _this.showModel=false;
                            });
                        }

                    } else {

                    }
                })



            },
            compareDate:function(d1) {
                return ((new Date(d1)) > (new Date()));
            },
            initPage:function () {
                console.log("11")
                $('html,body').animate({scrollTop: '10000px'}, 100);
            },
            share:function () {
                var that = this
//                var param = {
//                    title: that.title,
//                    content: '最终投票结果',
//                    imgUrl: 'http://oa.yingfeng365.com/dist/img/tplgo.png',
//                    linkUrl: "http://oa.yingfeng365.com/page/voteApp/result.html?mainId="+that.mainId+"&title="+that.title+"&shareApp=true"
//                }
//                JSBridge.call(SHARE, 'showShareMenu', param, function (res) {
//                    that.showToast(res)
//                })

                var param = {
                    wxUserName: 'gh_e00723ba1af8',
                    wxPath: 'pages/result/result?id='+that.mainId+'&title='+that.title,
                    title: that.title,
                    content: that.title,
                    imgUrl: 'http://oa.yingfeng365.com/dist/img/tp2.jpg',
                    linkUrl: "http://oa.yingfeng365.com/page/voteApp/result.html?mainId="+that.mainId+"&title="+that.title+"&shareApp=true",
                    openMiniProgram: false //false需要应用和小程序需要绑定在同一微信开放平台账号下, 不同账号下传true
                }
                JSBridge.call(SHARE, 'showShareMiniProgram', param, function (res) {
                    that.showToast(res)
                })
            },
            number2big: function (number) {
                switch (Number(number)) {
                    case 1:
                        return '一';
                        break;
                    case 2:
                        return '二';
                        break;
                    case 3:
                        return '三';
                        break;
                    case 4:
                        return '四';
                        break;
                    case 5:
                        return '五';
                        break;
                    case 6:
                        return '六';
                        break;
                    case 7:
                        return '七';
                        break;
                    case 8:
                        return '八';
                        break;
                    case 9:
                        return '九';
                        break;
                    case 10:
                        return '十';
                        break;
                    case 11:
                        return '十一';
                        break;
                    case 12:
                        return '十二';
                        break;
                    case 13:
                        return '十三';
                        break;
                    case 14:
                        return '十四';
                        break;
                    case 15:
                        return '十五';
                        break;
                    case 16:
                        return '十六';
                        break;
                    case 17:
                        return '十七';
                        break;
                    case 18:
                        return '十八';
                        break;
                    case 19:
                        return '十九';
                        break;
                    case 20:
                        return '二十';
                        break;
                }
            },
            formatDate: function (now) {
                if(now) {
                    return new Date(now).Format(TimeFormat.middle)
                }
            },
            compareDate:function(d1) {
                return ((new Date(d1)) > (new Date()));
            },
            getMain:function () {
                JSBridge.call(UI, 'showLoading', {})
                var _this = this; //声明一个变量指向Vue实例this，保证作用域一致
                $.wyui.postMethod("/vote/getMainInfoById.json", {"mainId":_this.mainId}, function (res) {
                    console.log(res);
                    var newList=[];
                    var nameList='';
                    var auditIds=[];
                    if(res.audit&&res.audit.length>0){
                        for(var c=0;c<res.audit.length;c++){
                            auditIds.push(res.audit[c].auditorId);
                        }
                        res.auditAllIds=auditIds.join(",");
                    }else{
                        res.auditAllIds='';
                    }
                    if(res.assigner&&res.assigner.length>0){
                        if(res.auditFlag==0){
                            //审核过程中 展示所有重新指定结果
                            if(res.auditAllIds.indexOf(_this.userId)>-1||_this.userId==res.createUserId){
                                for(var i=0;i<res.assigner.length;i++){
                                    var data=res.assigner[i];
                                    var num=nameList.indexOf('%'+data.assigner+'%');

                                    if(num==-1){
                                        nameList+='%'+res.assigner[i].assigner+'%';
                                        var obj={};
                                        obj.name=data.assigner;
                                        obj.list=[];
                                        for(var a=0;a<res.assigner.length;a++){
                                            var item=res.assigner[a];
                                            if(data.assigner==item.assigner){
                                                obj.list.push(item)
                                            }
                                        }
                                        newList.push(obj);
                                    }

                                }

                            }
                        }else if(res.auditFlag==1){
                            //通过 只展示贺总
                            for(var i=0;i<res.assigner.length;i++){
                                var data=res.assigner[i];

                                if(data.createUserName==res.currentAuditorName){
                                    var obj={};
                                    obj.name=data.assigner;
                                    obj.list=[];
                                    for(var a=0;a<res.assigner.length;a++){
                                        var item=res.assigner[a];
                                        if(data.assigner==item.assigner){
                                            obj.list.push(item)
                                        }
                                    }
                                    newList.push(obj);
                                }

                            }
                        }

                        res.assigner=newList;
                    }


                    _this.mainInfo=res;
                    _this.selectBox.companyIds=res.companyIds.split(',')
                    _this.selectBox.departNames=res.departNames.split(',')
                    _this.selectBox.roleNames=res.roleNames.split(',')
                    _this.getCompanyList();
                    _this.hideLoading()
                });
            }


        },
        mounted: function () {
            var _this = this; //声明一个变量指向Vue实例this，保证作用域一致
            JSBridge.call(UI, 'showLoading', {})
            _this.date = new Date().Format("hh:mm"); //修改数据date
            this.timer = setInterval(function () {
                _this.date = new Date().Format("hh:mm"); //修改数据date
            }, 1000)
            this.getMain();

            if(_this.userId) {
                $.wyui.postMethod("/vote/getUserInfoByUserId.json", {id: _this.userId}, function (info) {
                    _this.userInfo = info.userInfo;
                });
            }

            $.wyui.postMethod("/vote/getResultList.json", {"mainId":_this.mainId}, function (res) {
                _this.list=res.result;
            });
            var newlist=[];
            $.wyui.postMethod("/vote/getResultTypeList.json", {"mainId":_this.mainId}, function (res) {
                _this.resultInfo=res;
                if(_this.resultInfo.result2.list2&&_this.resultInfo.result2.list2.length>0){
                    for(var i=0;i<_this.resultInfo.result2.list2.length;i++){
                        var data=_this.resultInfo.result2.list2[i];
                        var str=true;
                        for(var b=0;b<_this.resultInfo.result1.list.length;b++){
                            var data2=_this.resultInfo.result1.list[b];
                            if(data.name==data2.name){
                                str= false;
                            }
                        }
                        if(str){
                            newlist.push(data)
                        }
                    }
                    if(newlist&&newlist.length>0){
                        _this.resultInfo.result2.list2=newlist
                        _this.resultInfo.result2.num2=newlist.length;

                    }
                }
                console.log(res)
            });
            console.log(newlist)

        }
    });

</script>
<script>

    $(".search-button").on('click', function () {
        searchTree()
    });
    function searchTree(type) {
        var text=''
        if(type){
            text = '';
        }else{
            text = $(".selecetInput").val();

        }

        if (text != "") {
            var allNode = app.treeObj.transformToArray(app.treeObj.getNodes());
            ;
            app.treeObj.hideNodes(allNode);
            nodeList = app.treeObj.getNodesByParamFuzzy("name", text);
            nodeList = app.treeObj.transformToArray(nodeList);
            for (var n in nodeList) {
                app.treeObj.selectNode(nodeList[n], true);
                findParent(app.treeObj, nodeList[n]);
            }
            app.treeObj.showNodes(nodeList);

        } else {
            var allNode = app.treeObj.transformToArray(app.treeObj.getNodes());
            ;
            app.treeObj.showNodes(allNode);
            app.treeObj.cancelSelectedNode();
            app.treeObj.expandAll(false);
            for (var index in allNode) {
                if (allNode[index].level < 2) {
                    app.treeObj.expandNode(allNode[index], true, false, false);
                }
            }

        }
    }

    function findParent(treeObj, node) {
        treeObj.expandNode(node, true, false, false);
        var pNode = node.getParentNode();
        if (pNode != null) {
            nodeList.push(pNode);
            findParent(treeObj, pNode);
        }
    }


</script>
<script>
    //禁用返回键后,点击app返回键回调
    //    function onBackPressed(enableNavigateBack) {
    //        JSBridge.call(UI, 'refresh')
    //    }
</script>
<script src="https://cdn.bootcss.com/html5media/1.1.8/html5media.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    var url = location.href.split('#').toString();
    var title = "滚滚向前投票助手";
    var discuss = "最终投票结果";
    var shareImgUrl = 'http://oa.yingfeng365.com/dist/img/tplgo.png';
    var timestamp;
    var noncestr;
    var signature;
    //获取签名
    $.ajax({
        type: "GET",
        url: server.ip+"/wshare/getSignature.json",
        //data:{timestamp:timestamp,noncestr:noncestr,url:url},
        data: {url: url},
        success: function (data) {
            console.log("success");
            var objData = data;
            timestamp = objData.timestamp;
            noncestr = objData.noncestr;
            signature = objData.signature;
            console.log(objData);
            wxShare();
        },
        statusCode: {
            404: function () {
                alert('page not found');
            }
        }
    });
    function wxShare() {
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: 'wx687174fc0632009d', // 和获取Ticke的必须一样------必填，公众号的唯一标识
            timestamp: timestamp, // 必填，生成签名的时间戳
            nonceStr: noncestr, // 必填，生成签名的随机串
            signature: signature,// 必填，签名，见附录1
            jsApiList: [
                'onMenuShareAppMessage', 'onMenuShareTimeline'
            ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
    }
    wx.ready(function () {
        //config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，
        //config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关
        //接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
        //----------“分享给朋友”
        wx.onMenuShareAppMessage({
            title: title, // 分享标题
            desc: discuss, // 分享描述
            link: url, // 分享链接
            imgUrl: shareImgUrl, // 分享图标
            success: function () {
                console.log("1")
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
        //------------"分享到朋友圈"
        wx.onMenuShareTimeline({
            title: title, // 分享标题
            desc: discuss, // 分享描述
            link: url, // 分享链接
            imgUrl: shareImgUrl, // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {


                // 用户确认分享后执行的回调函数、
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });


    });
    wx.error(function (res) {
        // config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
        console.log(res);
    });
</script>
</body>